package cn.buddha.jesj.callback;

/**
 * @ClassName CallbackTest
 * @Author 友野浩二
 * @Date 2019/11/17 11:30
 * @Description 回调机制测试
 * @Version 1.0
 */
public class CallbackTest {

    public static void main(String[] args) {
        StudentService studentService = StudentService.builder().build();
        // studentService作为入参【调用】Calc.getAnswer()的方法;
        // Calc.getAnswer()方法再【回调】studentService.callback()方法
        Calc calc = Calc.builder().build();
        calc.getAnswer("ST-CB", studentService);

        studentService.ask("ST-ASK", calc);
    }

}
